<!--CONTAINER-->
<div class="ctr">

<!--HEADER-->
<header id="header">

<a id="logo" href="index.php">Pharmacy Match</a>

<ul>
<li>Welcome <span>Username</span></li>
<li><a href="view-account.php">View Account</a></li>
<li><a href="edit-account.php">Edit Account</a></li>
<li><a href="logout.php">Logout</a></li>
</ul>
</header>
<!--HEADER-->

<!--COLUMN 1-->
<div class="ThreeColGrid_c1">
<img src="/pharmacy/img/avatar.jpg" width="100" height="100" alt="Username">
<?php echo $html->link(__('Add/change image', true), array('controller'=>'vacancies','action' => 'add'),array('class'=>'btnBlue'));?>
</div>
<!--COLUMN 1-->

<!--COLUMN 2-->
<div class="ThreeColGrid_c2">
<a href="#">Edit a store</a>
When the user clicks store name the edit form appears below

<ul>
<li>Store Name</li>
<li>Store Name</li>
</ul>

<a href="#">Add a store</a>

When the user clicks add a store the form below appears
<br>
<br>
<br>
<br>

<?php $session->flash(); ?>    
<?php echo $form->create('Store',array('action' => 'edit'));?>  
<?php echo $form->input('id',array('label'=>'','div'=>'','type'=>'hidden')); ?>
<table border="0" cellspacing="0" cellpadding="0">
    <tr>
        <td valign="top">Username</td>
        <td><?php echo $form->input('Username',array('label'=>'','div'=>'')); ?></td>
    </tr>
    <tr>
        <td valign="top">Password</td>
        <td><?php echo $form->input('Password',array('type'=>'password','label'=>'','div'=>'','value'=>'')); ?></td>
    </tr>
    <tr>
        <td valign="top">Pharmacy name</td>
       <td><?php echo $form->input('PharmacyName',array('label'=>'','div'=>'')); ?></td>
    </tr>
    <tr>
        <td valign="top">Address</td>
        <td><?php echo $form->input('Address', array('type' => 'textarea','label'=>'','escape' => false,'rows'=>5,'cols'=>30));?></td>
    </tr>
    <tr>
        <td valign="top">County</td>
        <td>
            <select name="data[Store][Country_id]" id="UserCountry">
                <?php
                      $temp ='';
                      foreach ($GLOBALS['Counties'] as $group=>$countries)
                      {
                           if($group != $temp)
                           {
                                echo  '<optgroup label="'.$group.'">'  ;
                           }
                           foreach ($countries as $k=>$country) 
                           {
                                if($this->data['Store'][Country_id] == $k)
                                    echo  ' <option value="'.$k.'" selected="selected">'.$country.'</option>'   ;
                                else
                                    echo  ' <option value="'.$k.'">'.$country.'</option>'   ;
                           }
                           
                           $temp = $group;
                      }
                ?>
            </select>
        </td>
    </tr>
    <tr>
        <td valign="top">Postcode</td>
        <td><?php echo $form->input('Postcode',array('label'=>'','div'=>'')); ?></td>
    </tr>
    <tr>
        <td valign="top">Email</td>
        <td><?php echo $form->input('Email',array('label'=>'','div'=>'')); ?></td>
    </tr>
    <tr>
    <td valign="top">Telephone</td>
     <td><?php echo $form->input('Telephone',array('label'=>'','div'=>'')); ?></td>
    </tr>
    <tr>
        <td valign="top">Fax</td>
        <td><?php echo $form->input('Fax',array('label'=>'','div'=>'')); ?></td>
    </tr>
    <tr>
        <td valign="top">Match member since</td>
        <td>00-00-00</td>
    </tr>
    <tr>
        <td valign="top">Last logged in</td>
        <td>00-00-00</td>
    </tr>
    <tr>
        <td valign="top">GPHC Number</td>
        <td><?php echo $form->input('GPHCNumber',array('label'=>'','div'=>'')); ?></td>
    </tr>
    <tr>
        <td valign="top">Date of pharmacist registration</td>
        <td><?php echo $form->input('DateOfPharmacist',array('type'=>'text','label'=>'','div'=>'')); ?></td>
    </tr>
  
    <tr>
       <td valign="top">IT compatibility</td>
       <td><?php
       if(is_array($this->data['Store']['ITCompatibility']))
       {
         $this->data['Store']['ITCompatibility'] = implode(',',$this->data['Store']['ITCompatibility']);
       }
       
       echo $form->select('ITCompatibility',$GLOBALS['ITCompatibility'],explode(',',$this->data['Store']['ITCompatibility']),array('multiple'=>true,'label'=>'','div'=>''),false);
       
       ?>
       
       </td>          
    </tr>
    <tr>
        <td valign="top">EPS1 ready</td>
         <td>Yes <?php echo $form->checkbox('EPS1Ready',array('label'=>'','div'=>'')); ?></td>
    </tr>
    <tr>
        <td valign="top">EPS2 ready</td>
        <td valign="top">Yes <?php echo $form->checkbox('EPS2Ready',array('label'=>'','div'=>'')); ?></td>
    </tr>
    <tr>
        <td valign="top">Opening hours</td>
        <td valign="top">
        <table border="0" cellspacing="0" cellpadding="0">
        <?php foreach($GLOBALS['Days'] as $day){?>
            <tr>
            <td valign="top"><?php echo $day.':'?></td>
                <td valign="top">
                    <select name = "data[Store][<?php echo $day?>][from]">  
                         <?php foreach($GLOBALS['OpeningHours'] as $openingHours){?>
                                    <option value="<?php echo $openingHours?>"><?php echo $openingHours?></option>
                          <?php }?>
                    </select> -
                </td>
                 <td>
                     <select name = "data[Store][<?php echo $day?>][to]">   
                         <?php foreach($GLOBALS['OpeningHours'] as $openingHours){?>
                                    <option value="<?php echo $openingHours?>"><?php echo $openingHours?></option>
                          <?php }?>    
                     </select>
                 </td>
                </tr>
        <?php } ?>
        </table>
</td>
</tr>
    <tr>
        <td>Lunch closure</td>
        <td><?php echo $form->checkbox('LunchClosure',array('label'=>'','div'=>'')); ?></td>
    </tr>
    <tr>
        <td>Free parking</td>
        <td><?php echo $form->checkbox('FreeParking',array('label'=>'','div'=>'')); ?></td>
    </tr>
    <tr>
        <td>Prescription items</td>
        <td>
         <?php echo $form->select('PrescriptionItems',$GLOBALS['PrescriptionItems'],null,array('label'=>'','div'=>''),false); ?>
        </td>
    </tr>
    <tr>
        <td>Staff</td>
        <td><?php
        if(is_array($this->data['Store']['Staff']))
        {
             $this->data['Store']['Staff'] = implode(',',$this->data['Store']['Staff']);
        }
         echo $form->select('Staff',$GLOBALS['Staff'],explode(',',$this->data['Store']['Staff']),array('multiple'=>true,'label'=>'','div'=>''),false); ?></td>          
    </tr>
    <tr>
        <td>Consultation room</td>
        <td>Yes<?php echo $form->checkbox('ConsultationRoom',array('label'=>'','div'=>'')); ?></td>
    </tr>
    <tr>
        <td>Community dossette patients (CDS)</td>
        <td>Number <?php echo $form->input('CommunityDossettePatients',array('label'=>'','div'=>'')); ?></td>
    </tr>
    <tr>
        <td>Servicing of care/nursing homes</td>
        <td>Number <?php echo $form->input('Servicing',array('label'=>'','div'=>'')); ?></td>
    </tr>
    <tr>
        <td valign="top">Essential services</td>
        <td><?php
        if(is_array($this->data['Store']['EssentialServices']))
        {
            $this->data['Store']['EssentialServices'] = implode(',',$this->data['Store']['EssentialServices']);
        }
         echo $form->select('EssentialServices',$GLOBALS['EssentialServices'],explode(',',$this->data['Store']['EssentialServices']),array('label'=>'','div'=>'','multiple'=>true),false); ?></td>          
    </tr>
    <tr>
        <td valign="top">Advanced services</td>
        <td><?php 
        if(is_array($this->data['Store']['AdvancedServices']))
        {
          $this->data['Store']['AdvancedServices'] = implode(',',$this->data['Store']['AdvancedServices']);
        }
        echo $form->select('AdvancedServices',$GLOBALS['AdvancedServices'],explode(',',$this->data['Store']['AdvancedServices']),array('label'=>'','div'=>'','multiple'=>true),false); ?></td>          
    </tr>
    <tr>
        <td valign="top">Enhanced services</td>
        <td><?php 
         if(is_array($this->data['Store']['EnhancedServices']))
        {
          $this->data['Store']['EnhancedServices'] = implode(',',$this->data['Store']['EnhancedServices']);
        }
        echo $form->select('EnhancedServices',$GLOBALS['EnhancedServices'],explode(',',$this->data['Store']['EnhancedServices']),array('label'=>'','div'=>'','multiple'=>true),false); ?></td>          
    </tr>
    <tr>
        <td valign="top">Patient Group Directives</td>
        <td>
             <?php echo $form->textarea('PatientGroupDirectives',array('label'=>'','div'=>'','cols'=>30,'rows'=>5)); ?>
        </td>
    </tr>
    <tr>
        <td><?php echo $form->submit();?></td>
        <td>&nbsp;</td>
    </tr>
    <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
  </tr>
</table>

<?php echo $form->end(); ?>

</div>
<!--COLUMN 2-->

<!--COLUMN 3-->
<div class="ThreeColGrid_c3"></div>
<!--COLUMN 3-->